strComputer = "."
Set fso = CreateObject("Scripting.FileSystemObject")

Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colChassis = objWMIService.ExecQuery _
    ("Select * from Win32_SystemEnclosure")

Set tf = fso.CreateTextFile("ch001.txt", True)

For Each objChassis in colChassis
    For  Each strChassisType in objChassis.ChassisTypes
    if strChassisType < 9 then
		tf.WriteLine("0"+strChassisType)
	else
	 	tf.WriteLine(strChassisType)
	 end if	
     Next
Next

tf.Close